<template>
    <view class="uni-container">
       <view class="uni-header-logo">
            <image class="uni-header-image" src="/static/img/tabbar/gongdan1.png"></image>
			<text class="logo-text">设备工单</text>
        </view>
        <view class="uni-panel" v-for="(item, index) in list" :key="item.id">
           <view class="uni-panel-h" :class="item.open ? 'uni-panel-h-on' : ''" @tap="triggerCollapse(index)">
                <text class="uni-panel-text">{{item.name}}</text>
            </view>
        </view>
    </view>
</template>
<script>
	import tableTitleConst from '../../../common/tableTitleConst.js'
	import userInfoConst from '../../../common/userInfoConst.js'
    // TODO 修复Android v3 加载过慢问题
    // #ifdef APP-PLUS
    var domModule = weex.requireModule('dom');
    domModule.addRule('fontFace', {
        'fontFamily': "uniicons",
        'src': "url('/static/uni.ttf')"
    });
    // #endif

    export default {
        data() {
            return {
                list: userInfoConst.tabbar1
            }
        },
        methods: {
            triggerCollapse(e) {
				console.log(e);
				var pageStr = "equipment"+e;
               uni.navigateTo({
				   url:"../../content/equipment/"+pageStr,
				   success: res => {
					   console.log(res);
				   },
				   fail: res => {
					   console.log(res);
				   },
			   });
				
            }
        }
    }
</script>

<style>
    @import '../../../common/uni-nvue.css';
</style>
